const caseDao = require('../dao/caseDao');
const serviceCommon = require('../util/serviceCommon');

const service = {
    handleAddCase: async (data) => {
        let result;
        result = await serviceCommon.addDataMethod(caseDao, 'handleAddCase', data);
        return result;
    },
    handleGetCase: async () => {
        let result;
        result = await serviceCommon.getListMethod(caseDao, 'handleGetCase');
        return result;
    },
    handleSearchCase: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(caseDao, 'handleSearchCase', data);
        return result;
    },
    handleDeleteCase: async (data) => {
        let result;
        result = await serviceCommon.deleteDataMethod(caseDao, 'handleDeleteCase', data);
        return result;
    },
    handleStartCase: async (data) => {
        let result;
        result = await serviceCommon.editDataMethod(caseDao, 'handleStartCase', data);
        return result;
    },
    handleOutageCase: async (data) => {
        let result;
        result = await serviceCommon.editDataMethod(caseDao, 'handleOutageCase', data);
        return result;
    },
    handleEditCase: async (data) => {
        let result;
        result = await serviceCommon.editDataMethod(caseDao, 'handleEditCase', data);
        return result;
    }
};
module.exports = service;